import {createStore, applyMiddleware} from 'redux';
import {composeWithDevTools} from 'redux-devtools-extension';
import thunk from 'redux-thunk';

import reducers from './reducers';
/**
 * redux最核心的管理对象：
 * store对象
 * countor 是reducer
 * applyMiddleware(thunk) 使用异步中间件
 * composeWithDevTools() 浏览器支持redux扩展程序调试
 */
const store = createStore(reducers,composeWithDevTools(applyMiddleware(thunk)));

export default store;